<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('用户列表')" />
	<th:block th:include="include :: layout-latest-css" />
	<th:block th:include="include :: ztree-css" />
</head>
<body class="gray-bg">
	<div class="ui-layout-center">
		<ul class="nav nav-tabs">
			<li role="presentation" ><a th:href="@{/system/user/common_edit/{userId}(userId=${userId})}">用户基本信息</a></li>
			<li role="presentation" ><a th:href="@{/bajiaostar/detail/edit/{userId}(userId=${userId})}">用户详情</a></li>
			<li role="presentation" ><a th:href="@{/bajiaostar/coupon/{userId}(userId=${userId})}">我的优惠卷</a></li>
			<li role="presentation" ><a th:href="@{/bajiaostar/collect/2/{userId}(userId=${userId})}">我收藏的零工</a></li>
			<li role="presentation" ><a th:href="@{/bajiaostar/collect/0/{userId}(userId=${userId})}">我收藏的雇主</a></li>
			<li role="presentation" ><a th:href="@{/bajiaostar/collect/1/{userId}(userId=${userId})}">我收藏的雇员</a></li>
			<li role="presentation" ><a th:href="@{/bajiaostar/black/{userId}(userId=${userId})}">黑名单</a></li>
			<li role="presentation" ><a th:href="@{/bajiaostar/flow/myflow/{userId}(userId=${userId})}">我的流水</a></li>
			<li role="presentation" ><a th:href="@{/bajiaostar/flow/myflowpingfen/{userId}(userId=${userId})}">我的评分</a></li>
			<li role="presentation" class="active"><a href="#">我的下级</a></li>
			<li role="presentation" ><a th:href="@{/bajiaostar/draw/}">提现列表</a></li>
			<li role="presentation" ><a th:href="@{/bajiaostar/event/}">邀请管理</a></li>
			<li role="presentation" ><a th:href="@{/system/user/taskCateUser/{userId}(userId=${userId})}">工种统计</a></li>
		</ul>
		<div class="container-div">
				<form id="user-form">
					<input type="hidden" name="userId" th:value="${userId}"/>
				</form>
		        <div class="col-sm-12 select-table table-striped">
				    <table id="bootstrap-table" data-mobile-responsive="true"></table>
				</div>
			</div>
		</div>
	</div>

	<th:block th:include="include :: footer" />
	<th:block th:include="include :: layout-latest-js" />
	<th:block th:include="include :: ztree-js" />
	<script th:inline="javascript">
		var editFlag = [[${@permission.hasPermi('system:user:edit')}]];
		var removeFlag = [[${@permission.hasPermi('system:user:remove')}]];
		var resetPwdFlag = [[${@permission.hasPermi('system:user:resetPwd')}]];
		var prefix = ctx + "system/user";

		$(function() {
		    var panehHidden = false;
		    if ($(this).width() < 769) {
		        panehHidden = true;
		    }
		    $('body').layout({ initClosed: panehHidden, west__size: 185 });
		    queryUserList();
		});

		function queryUserList() {
		    var options = {
		        url: prefix + "/my_sub",
		        sortName: "u.createTime",
		        sortOrder: "desc",
		        modalName: "用户",
		        columns: [{
		            checkbox: true
		        },
		        {
		            field: 'userId',
		            title: '用户ID'
		        },
		        {
		            field: 'userName',
		            title: '用户名称'
		        },
				{
					field: 'phonenumber',
					title: '手机验证码'
				},
		        {
		            field: 'createTime',
		            title: '创建时间'
		        }]
		    };
		    $.table.init(options);
		}


	</script>
</body>
<!-- 导入区域 -->
<script id="importTpl" type="text/template">
<form enctype="multipart/form-data" class="mt20 mb10">
	<div class="col-xs-offset-1">
		<input type="file" id="file" name="file"/>
		<div class="mt10 pt5">
			<input type="checkbox" id="updateSupport" name="updateSupport" title="如果登录账户已经存在，更新这条数据。"> 是否更新已经存在的用户数据
			 &nbsp;	<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
		</div>
		<font color="red" class="pull-left mt10">
			提示：仅允许导入“xls”或“xlsx”格式文件！
		</font>
	</div>
</form>
</script>
</html>